Repository navigation
workflow: hand a card's facts to the run from the panel - #2497
Conversation
|
@Birfy review request — this PR has no reviewer verdict at its current tip.
Risk tier is T2 (computed from the base The PR carries the red-first evidence in its body: a host stub card holding a multi-line |
|
Verdict: PASS at b3bdbbb Ran at this tip: Red first, same command with The two #2495 cases and the five body-shape cases go green only with the change; the tip file was restored and the run above is the restored one. Not run by me: Why PASS:
|
The panel's Hand a task to a Workflow built `workflow/assign` from the card's id and title, and its own read of the Tasks board dropped `brief` on the way in, so a card that carried a work order reached the new run with none and the node fell back to the title. The read keeps `brief` now, and the assign body sends the card's own text verbatim — an explicit empty string when the card holds none, so a brief an earlier call cached cannot come back. Fixes ThinkFlowLab#2495 Owner: Dev-5 Written-by: Dev-5 Reviewer: Birfy Claim-Id: ecb278a60cca446e8fbdfdbe27c0c484
Fixes #2495
Owner: Dev-5
Written-by: Dev-5
Reviewer: Birfy
Claim-Id: ecb278a60cca446e8fbdfdbe27c0c484
Risk tier: T2 —
plugins/workflow/client.jssits underplugins/**; the rest is its test, one doc line and a changelog fragment.What changed
plugins/workflow/client.js—loadTaskskeeps the card'sbriefwhen it projects the host'stasksrows, andconfirmAssignsends that text toworkflow/assign: the card's ownbriefverbatim, or an explicitbrief: ''when the card holds none.''is deliberate. Omitting the key means "keep what the lane cached" on the service side, so a card whose facts were cleared would otherwise hand an earlier call's stale text to the new run — the non-blocking hole workflow: let the card decide its brief when a re-match hands it on #2490 recorded.plugins/workflow/src/service.js,core/client.jsandpatches/ds-bot/*are untouched. The service already readsbody.briefand stores it ontask.brief(service.js:1354-1358), and workflow/assign resolves the brief from the task, so a re-dispatch to another lane keeps its facts #2468's contract is unchanged.Why the two spots move together
loadTasks(plugins/workflow/client.js:2196-2198) projected every row the host answered down to{id, title, status, priority, column}, sobriefnever reached the component;confirmAssign(:2249) looks the card up in exactly that list, which madetask.briefpermanentlyundefinedthere. Changing only the assign body would send''on every hand-off: the facts would still not reach the run, acceptance 1 would stay red, and acceptance 2 would pass for the wrong reason. The read dropping the field and the write not carrying it are one defect.Files (
git diff --numstat e809c43a...HEAD)plugins/workflow/client.js+7/−1plugins/workflow/test/client.test.js+73/−5docs/subsystems/workflow.md+1/−1changelog.d/2495-workflow-panel-assign-brief.fixed.md+1/−0Red first
On a clean tree at
ecee1417— the live main the branch was cut from;e809c43aonly adds #2491's Settings change — with only the two new cases added (plugins/workflow):# tests 173 / # pass 171 / # fail 2:Both cases stub the host with a card that carries a multi-line brief (or none at all) and assert on the
body.briefthe panel posts; the first only goes green when the projection and the body are both changed, the second pins the no-revival value. The same file after the fix is# tests 173 / # pass 173 / # fail 0.Ran
plugins/workflow, at the tip:# tests 440 / # suites 4 / # pass 440 / # fail 0TZ=UTC ARCH_DOCS_BASE=e809c43a npm run verify→ exit 0, 4932 passed / 0 failed (core 2896, social 577, tree 137, timeline 141, workflow 440,.github671, interop 37, live-e2e 26),arch-docs: OK (4 changed file(s));patches checkreportsgenerate is a no-op.node scripts/lint-plugins.mjs→ exit 0, 0 errors (the warnings it prints are the existing ones inplugins/social,plugins/timelineandplugins/tree).core/index.jsorcore/src/host/**change.Docs
docs/subsystems/workflow.md— theclient.jsrow now states that the hand-off carries the card's own facts (verbatim, or an explicit empty one), so the path a person actually uses is inside the documented contract instead of silently outside it.Checkpoint
{
"pr": 2497,
"claim": "Dev-5",
"issue": 2495,
"summary": "
Hand a task to a Workflowbuiltworkflow/assignfrom the card's id and title, and its read of the Tasks board droppedbrief, so a card holding a work order reached the run with none and the node fell back to the title. The read keepsbriefnow, and the assign body sends the card's own text verbatim, or an explicit empty string when the card holds none, so a brief an earlier call cached cannot come back. The service,core/client.jsand the patches are untouched.","files": [
"plugins/workflow/client.js",
"plugins/workflow/test/client.test.js",
"docs/subsystems/workflow.md",
"changelog.d/2495-workflow-panel-assign-brief.fixed.md"
],
"checks": {
"ran": "TZ=UTC ARCH_DOCS_BASE=e809c43a npm run verify",
"result": "green",
"at": "b3bdbbb2f9217b93e382e264b3857b3b3281e304"
},
"next": "none — ready for review"
}